package se19team1e.dao.abstrakt.jaas;

import java.util.List;

import se19team1e.dao.abstrakt.generics.DataAccessObject;
import se19team1e.entity.AdvertiserDTO;
import se19team1e.exception.DataAccessException;

/**
 * An abstract DAO interface to manipulate the advertiser objects in the
 * persistence storage.
 * 
 * <p>
 * This interface is referenced by controllers, such that the underlying
 * persistence mechanism can be swapped out easily in the future.
 * </p>
 * 
 * @author Palaniappan Vairavan
 * 
 */
public interface AdvertiserDAO extends DataAccessObject<AdvertiserDTO> {
	/**
	 * Create the Advertiser DAO using interface DataAccessObject
	 * 
	 * @param AdvertiserDTO
	 *            The Advertiser dto
	 * @throws DataAccessException
	 */
	@Override
	public boolean create(AdvertiserDTO dtoType) throws DataAccessException;

	/**
	 * Deletes an existing Advertiser object from the persistence storage by the
	 * given id.
	 * 
	 * @param idType
	 *            ID of the Advertiser object to be deleted
	 * @return success state
	 * @throws DataAccessException
	 */
	@Override
	public boolean delete(Object idType) throws DataAccessException;

	/**
	 * Retrieve all Advertiser objects in the persistence storage.
	 * 
	 * @return list of Advertiser DataTransfer objects
	 * @throws DataAccessException
	 */

	@Override
	public List<AdvertiserDTO> retrieveAll() throws DataAccessException;

	/**
	 * Gets an existing Advertiser object from the persistence storage by the
	 * given id.
	 * 
	 * @param idType
	 *            ID of the Advertiser object
	 * @return Object Advertiser object specified by the ID
	 * @throws DataAccessException
	 */
	@Override
	public AdvertiserDTO retrieveById(Object idType) throws DataAccessException;

	/**
	 * Updates the delta of an existing Advertiser object to the persistence
	 * storage.
	 * 
	 * @param AdvertiserDTO
	 *            dto type is Advertiser
	 * @return Object updated Advertiser DTO
	 * @throws DataAccessException
	 */
	@Override
	public AdvertiserDTO update(AdvertiserDTO dtoType)
			throws DataAccessException;

	/**
	 * Gets an existing Advertiser object from the persistence storage by the
	 * given id. There is no override of super class.
	 * 
	 * @param idType
	 *            ID of the Advertiser object
	 * @return Object Advertiser object specified by the ID
	 * @throws DataAccessException
	 */
	public AdvertiserDTO retrieveByAccountId(String acountId)
			throws DataAccessException;

}
